#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>

using namespace std;

float Midaverage(vector<int> &arr)
{
    float ans = 0;
    vector<int> vi;

    sort(arr.begin(), arr.end());

    int size = arr.size();
    int start = size * 0.1;
    int num = size * 0.8;

    //将中值80%的数据求和
    for (int i = start; i <= num; i++)
    {
        ans += arr[i];
        vi.push_back(arr[i]);
    }

    // copy(vi.begin(), vi.end(), ostream_iterator<int>(cout, " ")); //输出检查

    return ans / vi.size();
}

int main()
{
    vector<int> vi{4, 5, 7, 8, 22, 44, 55};
    //{4,5,7,8,22,44,55,67,89,110};
    //{4, 9, 1, 2, 3, 8, 5, 7, 6, 0};

    float ans = Midaverage(vi);

    printf("%.2f", ans);

    return 0;
}